package com.bw.controller;

import com.bw.service.OrderInfoService;
import com.sugar.SugarUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @program: day13sugar
 * @ClassName OrderInfoController
 * @description:
 * @author: 10994 wzq
 * @create: 2025-06-06
 * @Version 1.0
 **/
@RestController
public class OrderInfoController {
    @Autowired
    OrderInfoService orderInfoService;

    @GetMapping("/findOrderInfo")
    public List<Map<String,Object>> findOrderInfo(){
        return orderInfoService.findOrderInfo();
    }
    @PostMapping("/getList2")
    public Map getList2(){
        double list2 = orderInfoService.getList2();
        Map flipNumberData = SugarUtil.getFlipNumberData(list2);
        return flipNumberData;
    }
}
